<div class="estabelecimentos index">
<h2><?php __('Estabelecimentos');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo $paginator->sort('id');?></th>
	<th><?php echo $paginator->sort('razao_social');?></th>
	<th><?php echo $paginator->sort('endereco');?></th>
	<th><?php echo $paginator->sort('complemento');?></th>
	<th><?php echo $paginator->sort('cep');?></th>
	<th><?php echo $paginator->sort('estado_id');?></th>
	<th><?php echo $paginator->sort('cidade_id');?></th>
	<th><?php echo $paginator->sort('bairro');?></th>
	<th><?php echo $paginator->sort('pais_id');?></th>
	<th><?php echo $paginator->sort('telefone1');?></th>
	<th><?php echo $paginator->sort('telefone2');?></th>
	<th><?php echo $paginator->sort('telefone3');?></th>
	<th><?php echo $paginator->sort('site_id');?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($estabelecimentos as $estabelecimento):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['id']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['razao_social']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['endereco']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['complemento']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['cep']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['estado_id']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['cidade_id']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['bairro']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['pais']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['telefone1']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['telefone2']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['telefone3']; ?>
		</td>
		<td>
			<?php echo $estabelecimento['Estabelecimento']['site_id']; ?>
		</td>
		<td class="actions">
			<?php echo $html->link(__('View', true), array('action' => 'view', $estabelecimento['Estabelecimento']['id'])); ?>
			<?php echo $html->link(__('Edit', true), array('action' => 'edit', $estabelecimento['Estabelecimento']['id'])); ?>
			<?php echo $html->link(__('Delete', true), array('action' => 'delete', $estabelecimento['Estabelecimento']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $estabelecimento['Estabelecimento']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('New Estabelecimento', true), array('action' => 'add')); ?></li>
	</ul>
</div>
